package com.anycl.design.j2ee.mvc.instance;

/**
 * 数据层
 */
public class MvcDB {

    public static MvcModel findByName(String name) {
        MvcModel model = null;
        switch (name) {
            case "Java":
                model = new MvcModel();
                model.setName("Java");
                model.setDesc("Java编程思想");
                break;
            case "MySQL":
                model = new MvcModel();
                model.setName("MySQL");
                model.setDesc("MySQL必知必会");
                break;
            default:
                break;
        }
        return model;
    }
}
